import { compareBothObject } from "./compareBothObject";

/**
 * @author lihh
 * @description 递归 比较对象
 * @param args 参数
 */
export function compareObjects(...args: Array<object>) {
  if (args.length < 2) {
    return false;
  }

  for (let idx = 0; idx < args.length - 1; idx += 1) {
    if (!compareBothObject(args[idx], args[idx + 1])) {
      return false;
    }
  }
  return true;
}
